One moving picture encoding scheme with a high compression rate is ISO/IEC 14496-10 Advanced Video Coding (Non-patent Document 1: ISO/IEC 14496-1.0 Advanced Video Coding), whose referential encoding scheme that is known is a Joint Model (JM) scheme. A moving picture encoding apparatus using the JM scheme will be referred to as a conventional moving picture encoding apparatus hereinbelow.
The conventional moving picture encoding apparatus applies encoding processing to Macro Blocks (MB's) one by one in each input image frame to generate encoded data, i.e., a bit stream. As used herein, an MB refers to a cell of an input image frame divided in a grid-like manner, containing 16×16 luminance pixels and 8×8 Cr-Cb chrominance pixels (FIG. 1). In a case that input data is interlaced, the structure of an image frame is divided into a first field and a second field, and each field serves as an image frame subjected to encoding processing.
Referring to FIG. 2, a conventional moving picture encoding apparatus for applying encoding processing to MB's is comprised of an MB buffer E101, a conversion apparatus E102, a quantization apparatus E103, an entropy coding apparatus E104, an inverse quantization/inverse conversion apparatus E105, a frame buffer E106, a prediction apparatus E107, a code-amount control apparatus E108, a motion vector calculating apparatus E109, and an MB mode deciding apparatus E110.
The MB buffer E101 stores therein an original image for an MB to be encoded.
According to AVC, a prediction method that provides satisfactory encoding of an MB to be encoded is selected for encoding from among a plurality of types of prediction methods. The prediction methods are generally classified into two types: intra-frame prediction and inter-frame prediction. Intra-frame prediction generates a predicted value from a reconstructed image of an image frame currently being encoded.
On the other hand, inter-frame prediction uses for prediction a reconstructed image of any one of a plurality of image frames encoded in the past.
Moreover, in inter-frame prediction according to AVC, a reconstructed image frame (reference frame) for use in inter-frame prediction is designated by an index ref_idx (reference index), and a position of a reconstructed image in the designated reconstructed image frame, which position serves as a source of a predicted value to be generated, is designated by a motion vector mv.
In addition, in inter-frame prediction according to AVC, by designating a type of inter-frame prediction (by selecting an MB mode mb_mode corresponding to the type of inter-frame prediction), it is possible to define a reference index ref_idx and a motion vector mv for a unitary block, which is a sub-division of an MB, for transmission (see Non-patent Document 1: ISO/IEC 14496-10 Advanced Video Coding for further information).
In general, a set of MB's (a slice) encoded only by intra-frame prediction is referred to as an I-slice, and a slice encoded by applying inter-frame prediction in addition to intra-frame prediction as a P-slice. Moreover, in inter-frame prediction, a slice including an MB that can be predicted using a combined image made up with a plurality of image frames is referred to as a B-slice. An image frame composed of I-slices solely is referred to as an I-picture, an image frame containing I-slices or P-slices (excluding B-slices) is referred to as a P-picture, and an image frame containing B-slices is referred to as a B-picture.
The motion vector calculating apparatus E109 looks up the original image stored in the MB buffer E101 and a reconstructed image stored in the frame buffer E106, and detects parameters (candidate reference index candidate_ref_idx and candidate motion vector candidate_mv) associated with the aforementioned plurality of types of prediction methods.
The MB mode deciding apparatus E110 uses the candidate reference index candidate_ref_idx and candidate motion vector candidate_mv detected by the motion vector calculating apparatus E109 to select a suitable one of the types of prediction for encoding an MB to be encoded (MB mode mb_mode). The selected MB mode mb_mode, and its corresponding reference index ref_idx and motion vector mv are entropy-encoded by the entropy coding apparatus E104.
The prediction apparatus E107 generates a predicted value corresponding to the MB mode mb_mode selected by the MB mode deciding apparatus E110, its corresponding reference index ref_idx and motion vector mv, from the reconstructed image stored in the frame buffer E106.
From the original image stored in the MB buffer E101 is subtracted the predicted value supplied by the prediction apparatus E107, and the result is supplied as a predictive error to the conversion apparatus E102.
The predictive error is converted into a value in the frequency domain by the conversion apparatus E102. The predictive error converted into the frequency domain is quantized by the quantization apparatus E103 with a quantization step size corresponding to a quantization parameter QP supplied by the code-amount control apparatus E108. The quantization parameter QP and quantized predictive error (quantization level) are entropy-encoded at the entropy coding apparatus E104 (Note that according to AVC, the quantization parameter can be defined on an MB-by-MB basis).
The above-described quantization level is subjected to inverse quantization and inverse conversion by the inverse quantization/inverse conversion apparatus E105, and brought back to its original spatial domain. The predictive error brought back to the spatial domain is added with the predicted value supplied by the prediction apparatus E107, and the result is stored in the frame buffer E106 as a reconstructed image for subsequent encoding.
The conventional moving picture encoding apparatus performs encoding processing by applying the aforementioned processing to each MB in each input image frame.